Time to name the ink colors of congruent words less than time to name the ink colors of incongruent words.
Null hypothesis(H0) : Time to name the ink colors of congruent words and incongruent words are equaivalent. Alternative hypothesis(1) : Time to name the ink colors of congruent words less than incongruent words.
two-sample t-test.
In [1]:
%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt
from scipy.stats import ttest_ind
path = '/Users/Slimn/Desktop/Work/Project/Udacity/NanoDegree/P1/stroopdata.csv'
df = pd.read_csv(path)
print df
Congruent Incongruent
Mean 14.051125 22.01591667 Standard Error 0.726550901 0.979195185 Median 14.3565 21.0175 Mode #N/A #N/A Standard Deviation 3.559357958 4.797057122 Sample Variance 12.66902907 23.01175704 Kurtosis -0.205224823 2.688900198 Skewness 0.416899874 1.547590026 Range 13.698 19.568 Minimum 8.63 15.687 Maximum 22.328 35.255 Sum 337.227 528.382 Count 24 24 Confidence Level(95.0%) 1.50298505 2.025619571
In [5]:
summary = df.describe()
summary.transpose()
Out[5]:
In [4]:
#%matplotlib inline
#plt.figure()
ax = df.boxplot()
plt.title('Measure time takes to name the ink colors')
#plt.figure()
#plt.legend()
Out[4]:
From the plot, mean time for congruent word ~14. mean time for congruent word ~22. the incongruent word have two sample outlier, this data set need to verify. participance taken short time to say for congruent word condition.
In [1]:
# Use scipy.stats.ttest_ind.
#t_stat, p_val = ttest_ind(df['Congruent'], df['Incongruent'], equal_var=False)
t_stat, p_val = ttest_ind(df['Congruent'], df['Incongruent'])
print "t_stat ", t_stat
print "P-value ", p_val
An independent-samples t-test was conducted to compare time to name ink color of congruent words and incongruent words conditions. There was a significant difference in taken time for congruent words (Mean=14.0511, STD=3.5594) and incongruent words (Mean=22.01591, STD=4.7971) conditions; t(24)= -6.5323, p = 6.5102e-08 These results show that ink color really does have an effect to human brain befoe alphabet.
The human brain is reconize color before alphabet. The similar task is Search engines replacing our memory. Research name : Google Effects on Memory: Cognitive Consequences of Having Information at Our Fingertips by Betsy Sparrow, Jenny Liu, Daniel M. Wegner
https://en.wikipedia.org/wiki/Stroop_effect http://pandas.pydata.org/pandas-docs/version/0.17.0/api.html http://docs.scipy.org/doc/scipy/reference/stats.html http://www.randalolson.com/2012/08/06/statistical-analysis-made-easy-in-python/ http://www.abc.net.au/science/articles/2011/07/15/3270222.htm http://www.sciencemag.org/content/333/6043/776